/**
 * 商品服务相关接口 
 */
var request = require('./request.js');


module.exports = {
  /**
   * 查询预售活动和商品详情
   * @param advanceId 预售活动Id
   * @param productId 预售商品Id
   */
  getByIds: function(advanceId, productId) {
    var params = {
      advanceId: advanceId,
      productId: productId
    }
    return request.get('/newretail/api/mall/advanceSell/getByIds', params)
  },
  /**
   * 分页查询预售活动
   */
  query: function(postData) {
    return request.get('/newretail/api/mall/advanceSell/query', postData)
  },
  /**
   * 获得尾款支付的签名
   */
  getBalancePaySign: function(postData) {
    return request.post('/newretail/api/mall/advanceSell/getBalancePaySign', postData)
  },
  /**
   * 创建预售订单
   */
  createOrder: function(postData) {
    return request.post('/newretail/api/mall/advanceSell/createOrder', postData)
  }
}